stabyourselffandomcom-20200214-history
Custom Enemy Properties
Currently copied shamelessly straight from the source. Needs to be cleaned up. Below is a list of every Custom Enemy property in Mari0: SE. Properties are formatted in the manner below, though note that the values given are only examples, and not meant to be used in earnest. "integer": 2 (Can be any whole number) "decimal": 0.2 (Can be any number with a decimal point) "boolean": true/false "string": "text" "array": value "^_comment": "anything can be placed here" Although the properties are listed in camel-case, they are case insensitive when used in-game. Graphics * : integer Number of frames in enemy.png. Default: 1 * : boolean Graphic will not be vertically split for the 4 spritesets. Default: false * : string Type of animation. **"frames" *** : integer First frame from the quads used in normal-state animation *** : integer Number of frames used in normal-state animation *** : decimal (seconds/frame) Frame duration in seconds **"mirror" *** : decimal (seconds) Time between each mirror of the image *** : integer Frame to use. Default: 1 **"none" *** : integer Frame to use. Default: 1 * : boolean Graphic will not get mirrored when moving left Positioning *"spawnOffsetX": (blocks) X-axis offset from in-editor spawn placement or center of ancestor *"spawnOffsetY": (blocks) Y-axis offset from in-editor spawn placement or center of ancestor *"width": (blocks) Collision width of the enemy *"height": (blocks) Collision height of the enemy *"offsetX": (pixels) X-axis offset for the image *"offsetY": (pixels) Y-axis offset for the image *"quadCenterX": (pixels) X-axis center of quads for rotation *"quadCenterY": (pixels) Y-axis center of quads for rotation *"customScissor": [''' ]' '(blocks)' Only draw parts of an enemy. The coordinates are set from top-left of the enemy's block and in blocks. **start, Y start, width, height *"invertedScissor": The enemy can be seen anywhere but the scissor region Interaction *"speedX": '(blocks/second)' Horizontal speed *"speedY": '(blocks/second)' Vertical speed *"gravity": '(blocks/second2)' Negative vertical acceleration *"lifetime": '(seconds)' Lifetime before this enemy is killed *"static": Object won't move or be affected by gravity (better performance) *"active": Object is updated and can collide (Usually true!) *"spawnSound": Sound that gets played when this enemy is created **Filename of the in-game sound, minus file extension. Custom sounds are not supported *"notKilledFromBlocksBelow": Will not die if on a block that gets hit by Mario from below *"jumpsFromBlocksBelow": Will jump if on a block that is hit by Mario from below *"makesMarioStar": Makes Mario starred on contact *"removeOnMarioContact": Will get removed when Mario touches it *"category": Used with Masks to determine which entities the enemy collides with *"mask": '[ ]' Array of categories masked with this enemy. If enemy.maskotherenemy.category is true, the two will ''not collide. *"portalable": Whether the enemy goes through portals. Default: true *"kills": Whether Mario dies upon any contact with this enemy *"killsOnSides": Whether Mario dies upon contact with the sides of this enemy *"killsOnBottom": Whether Mario dies upon contact with the bottom of this enemy *"killsOnTop": Whether Mario dies upon contact with the top of this enemy *"killsEnemies": Kills other enemies on contact *"killsEnemiesAfterPortal": Turns on KillsEnemies after going through a portal *"noCollideStops": Whether this enemy continues motion after collision (useful with bullets for example) *"emancipateCheck": Whether this enemy is emancipated by emancipation grills *"autoDelete": Enemy will be auto deleted if too low or behind the screen *"laserResistant": Makes this enemy immune to lasers *"resistsFire": Makes this enemy immune to Mario's fireballs *"resistsStar": Makes this enemy immune to starred Mario *"resistsSpikes": Makes this enemy immune to spikes (tile property) *"bounces": Whether this enemy will bounce every time it hits the floor (like a Star) *"bounceForce": (blocks/second) How strong each bounce will make the enemy fly up Stomp *"stompComboSuppressor": These enemies won't add to the player's combo of jumping on top of many enemies in a row *"stompable": Whether this enemy can be stomped **"stompAnimation": Whether the enemy changes to stompedFrame when stomped **"stompAnimationTime": Duration of stompedFrame **"stompedFrame": Frame used when stomped *"killedByBoxes": Makes this enemy stompable by cubes (doesn't require Stompable to be true) Shell "shellAnimal": Whether this enemy can retract into a shell: *"smallMovement": When stomped and a ShellAnimal, enemy will change to this enemy type *"smallSpeed": (blocks/second) Speed when getting kicked or changing directions Spawning "spawnsEnemy": Name of enemy to spawn. Modified by the following parameters: *"spawnEnemyDelays": array (seconds) A list of delays from which a random one is chosen every time *"throwQuadOffset": How much to add to the used quad (If your usual cycle is 1-2-1-2 and you want it to be 3-4-3-4 for the throwing, this is 2!) - this means the throw animation is of the same format as the normal animation *"throwPrepareTime": Amount of time before the actual throw that the throwquad is used Possible ways to set the speed of spawned enemies *Simple speed **"spawnEnemySpeedX": (blocks/second) X-Speed of spawned enemies **"spawnEnemySpeedY": (blocks/second) Y-Speed of spawned enemies *Random speed (Can be random for X and simple for Y for example) **"spawnEnemySpeedXRandomStart": (blocks/second) Minimum value of horizontal speed range (negative for left) **"spawnEnemySpeedXRandomEnd": (blocks/second) Maximum value of horizontal speed range **"spawnEnemySpeedYRandomStart": (blocks/second) Minimum value of vertical speed range **"spawnEnemySpeedYRandomEnd": (blocks/second) Maximum value of vertical speed range *Towards nearest player **"spawnEnemyTowardsPlayer": Override child SpeedX and SpeedY **"spawnEnemySpeed": (blocks/second) Set child SpeedX and SpeedY accordingly Movement * "movement": Movement type * "movementRandoms": array Movement types of which a random one is chosen (Overrides Movement) **"none" Does not accelerate except by gravity. Use truffleshuffle at speed 0 if you want the enemy to slide to a stop. **"truffleshuffle" Moves left and right. Think Goombas. ***TurnAroundOnCliff boolean Whether horizontal speed is reversed upon arrival on cliff ***TruffleshuffleSpeed decimal (blocks/second) Speed of horizontal movement ***TruffleshuffleAcceleration decimal (blocks/second2 ???) Acceleration of horizontal movement *"piston" Goes out and in and out and in. Think piranha plants. **PistonDistXdecimal Horizontal displacement of piston in blocks **PistonDistYdecimal Vertical displacement of piston in blocks **PistonSpeedXdecimal Horizontal speed **PistonSpeedYdecimal Vertical speed **PistonExtendTimedecimal Self explanatory **PistonRetractedTimedecimal Self explanatory **DontPistonNearPlayerboolean Self explanatory ***DontPistonDistdecimal Piston won't extend (but retract!) if player is this near **InactiveOnRetractedboolean Whether the enemy loses spawn and kill properties while retracted *follow Follows Mario. Think Lakitu.**followspacedecimal (blocks) The enemy will try to stay inside this many blocks from the player **DistanceTimedecimal Multiplied with the player speed to estimate where the player will be in this many seconds, that position is actually used then *shell Slides all over the place. Think stomped Koopas.**WakesUpboolean Whether this enemy returns to initial state **ResetTimedecimal (seconds) How long until this enemy wakes up from its shell **WiggleTimedecimal (seconds) How long before waking up the enemy will wiggle **WiggleDelaydecimal (seconds) Time between each wiggler **ChaseMarioOnWakeupboolean Whether the enemy might walk right if Mario is to its right on wake up *squid Moves down first, then towards player and up. Think those squids.**SquidFallSpeeddecimal Speed at which this enemy moves down (Phase 1) **SquidXSpeeddecimal Speed at which this enemy moves right and left (Phase 2) **SquidUpSpeeddecimal Speed at which this enemy moves up (Phase 2) **SquidAccelerationdecimal (blocks/second2) How fast the enemy accelerates **SquidDownDistanceblocks How far the enemy falls down **SquidHorDistanceblocks How far the enemy goes left/right *rocket Shoots up, falls down, repeat. Think those fire things in the castle.**RocketDistanceblocks How high this enemy will get shot up every time *verticalwiggle Goes up and down within a margin. Think Cheep Cheep.**VerticalWiggleDistanceblocks How far this enemy will wiggle downwards **VerticalWiggleSpeeddecimal (blocks/second) How fast this enemy wiggles up and down Alesan99's enemy.lua ADDED: "givecoinwhenstomped": boolean (gives coin when stomped) ADDED: "givecoinwhenshot": boolean (gives coin when shot) ADDED: "followspeed": decimal (how fast the enemy will follow you(if movement is set to "follow")) ADDED: "shotjumpforce": decimal (shot jumpforce duh) ADDED: "shotspeedx": decimal (shot speedx) ADDED: "fallswhenstomped": boolean (falls when stomped, even if it has a stomped frame) ADDED: "health": integer (health, decreased when shot or stomped) ADDED: "customtimer": array (put arrays in the array, the first slot is the delay, the second one is the action, the third one are the arguments) ACTIONS "bounce" "playsound" "setframe" "setHERE" ADDED: "chasetime": decimal (chase mario after a x seconds (like hammer bros in SMB)) ADDED: "chasespeed": decimal ADDED: "breaksblocks": boolean ADDED: "breakblockside": string (what side to break) ADDED: "spawnsenemyrandoms": array (spawns a random enemy) ADDED: "flyingtime": decimal ADDED: "flyingdistance": decimal ADDED: "reflects": boolean (bounces off of tiles) ADDED: tranformtriggers: "rightcollide", "leftcollide", "ceilcollide", "globalcollide", "collide", "death", "shot", "collidewith" .. enemyname ADDED: movements: "flyvertical", "flyhorizontal" (flying koopas) FIXED: dontpistondist not working ---------------------------------------------------- ADDED "shothealth": integer ADDED "stomphealth": integer ADDED "transformtriggerobjectcollide": string (transforms when it collides with an object) ADDED "transformtriggerenemycollide": string (transforms when it collides with an enemy) ADDED "playerneardist": integer (enemy will transform when player is this near (horizontal)) ADDED "playerneardist": array (same as above, but you can select a region. set up array like this: y, width, height) ADDED "staticIfSeen": boolean (becomes static when player faces the enemy) ADDED "staticIfNotSeen": boolean (opposite of above) ADDED "rotatetowardsplayer": boolean (faces player in all directions) ADDED "nofollowspeedup": boolean (enemy the enemy's movement is "follow" it won't speed up when the player is far) ADDED "transformsintorandoms": array ADDED "transformpassedparameters": array (parameters that get passed on once the enemy transforms) ADDED customtimer actions: "reverseHERE" (turns positive to negative and negative to positive) "addHERE" "multiplyHERE" ADDED transformtriggers: "lifetime", "playernear", "playernotnear", "seen", "notSeen" FIXED collide with specific entity transform trigger FIXED enemy being visible for one frame after it transformed (You won't have to make an empty frame anymore, Baf). REMOVED transformtriggers: "collidewith" Further Reading (aka what I copied from) *SE Documentation *Alesan99's new enemy.lua thread